//
//  YNMessagerReceiveHandle.h
//  Messenger
//
//  Created by iOS on 15/2/6.
//  Copyright (c) 2015年 孙浪. All rights reserved.
//
//  接收消息管理
//

#import <Foundation/Foundation.h>
#import "YNXMPPprotocol.h"
#import "YNIMFrameworkTypedef.h"
@class PictureModel;
@class YNMessage;
@class YNRecentChatObejct;
@class XMPPStream;

@interface YNMessagerReceiveHandle : NSObject

-(instancetype)initWith:(XMPPStream*)stream delegate:(id<YNXMPPprotocol>)delegate;

- (void)removeDelegate;

/// 发送文本消息 sendMessage
/// @param userId <#userId description#>
/// @param text <#text description#>
/// @param aitArray @数据
/// @param groupName <#groupName description#>
- (void)sendTextMessageToUserId:(NSString *)userId text:(NSString*)text aitArray:(NSString *)aitArray isTranspond:(BOOL)isTranspond groupName:(NSString*)groupName;

/// 事先组装好message情况下发送消息
/// @param message <#message description#>
-(void)sendMessage:(YNMessage *)message;

/// 发送普通消息回执
/// @param userId <#userId description#>
/// @param messageType <#messageType description#>
-(void)sendReceiptMessageToUserId:(NSString*)userId type:(ReceiptMessageType)messageType;

/**HX** 发送广播消息 **/
-(void)sendBroadcastMessage:(NSArray<NSString*>*)reciveUserIds body:(NSString*)body;

/// 重发消息
/// @param message <#message description#>
- (void)reSendMessage:(YNMessage *)message uploadBlock:(uploadChatFileBlock)block;

/// 发送图片
/// @param message <#message description#>
/// @param pic <#pic description#>
/// @param block <#block description#>
- (void)sendPhotoMessage:(YNMessage *)message pic:(PictureModel *)pic uploadBlock:(uploadChatFileBlock)block;

//发送文件
- (void)sendFileMessage:(YNMessage *)message uploadBlock:(uploadChatFileBlock)block;

//发送语音
- (void)sendVoiceMessage:(YNMessage *)message uploadBlock:(uploadChatFileBlock)block;

//发送文件消息回执
- (void)sendFileReturnMessage:(YNMessage *)message;
//声音等提醒方式被修改了
- (void)updateRemindSetting;

//创建RecentChat对象
+ (YNRecentChatObejct *)creatRecentChat:(YNMessage *)msg;

///视频会议间收到聊天消息解析
+(void)meetingReceiveMessage:(YNMessage *)message messageControType:(YNBubbleMessageType)controType;
/**
 *  返回一个数组
 *  可能为空数组
 *  或者 是 [字符串|图片|表情 ... , 表情个数, 是否图片文本混排]
 */
+ (NSMutableArray*)parserMessageStr:(NSString *)message messageBody:(NSString *)messageBody;
/**
 判断群，讨论组，项目组，两人会话
 
 @param userNo
 @return 0：二人会话 1:群 2：讨论组 3：项目组
 */
+(CurrenChatObjType)getCurrentMessageChatTypemanyPeopleChatWith:(NSString *)userNo;
@end
